import Skills from "./skill.js";
import Hero from "./hero.js";
import Skins from "./skin.js";

export default class Player{
    constructor(){
        // 初始化的时候玩家没有英雄
        this.heroes = null;
        this.username = null
    }
    login(username){
        // 玩家登录之后 英雄就有了
        this.username = username;
        let yaseSkills = [new Skills("亚瑟技能一","./sources/skills/16610.png"),new Skills("亚瑟技能二","./sources/skills/16620.png"),new Skills("亚瑟技能三","./sources/skills/16630.png")];
        let lubanSkills = [new Skills("鲁班技能一","./sources/skills/11210.png"),new Skills("鲁班技能二","./sources/skills/11220.png"),new Skills("鲁班技能三","./sources/skills/11230.png")]
        let yaseSkins = [new Skins("皮肤一","./sources/heroes/yase1.png","./sources/skins/301660.png"),
        new Skins("皮肤二","./sources/heroes/yase2.png","./sources/skins/301661.png")];
        let lubanSkins = [new Skins("皮肤一","./sources/heroes/luban1.png","./sources/skins/301120.png"),
        new Skins("皮肤二","./sources/heroes/luban2.png","./sources/skins/301121.png")]
        
        let yase = new Hero("亚瑟","./sources/heroes/yase1.png",yaseSkills,yaseSkins)
        let luban = new Hero("鲁班","./sources/heroes/luban1.png",lubanSkills,lubanSkins)
        this.heroes = [yase,luban];  //知道有哪些英雄；
    }
}